<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
        <title>{{ resta_name }}</title>
    </head>
    <body>
    {% if user.is_authenticated %}
        <p>您已经用{{ user }}登陆成功 <a href="{% url acct_logout_and_login %}">注销</a></p>
    {% else %}
        {% url acct_signup as signup_url %}
        <p>还没有帐号，请<a href="{{ signup_url }}">注册</a>！</p>
        <form id="login_form" method="post" action="{% url acct_login %}">
            <fieldset>
                {{ form.as_p }}
                <input type="submit" value="登陆" />
            </fieldset>
        </form>
    {% endif %}
    
        <h1>{{ resta_name }}</h1>        
        <ul id="restaurant">
            {% for course in object_list %}
            {% if user.is_authenticated %}
            <li><a href="{% url set_order course.id %}" title='点击订餐'>{{ course.name }}</a> - {{ course.price }}元  </li>
            {% else %}
            <li>{{ course.name }} - {{ course.price }}元  </li>
            {% endif %}
            {% endfor %}
        </ul>
        
        <p><a href="{% url check_order %}">查看订单</a></p>
    </body>
    
</html>